home *** CD-ROM | disk | FTP | other *** search
- Path: nntp.teleport.com!craigl
- From: craigl@teleport.com (Craig Lovegren)
- Newsgroups: comp.programming,alt.msdos.programmer,comp.lang.c++
- Subject: Re: How to detect HD
- Date: 18 Jan 1996 00:42:22 GMT
- Organization: Teleport - Portland's Public Access (503) 220-1016
- Message-ID: <4dk51e$c6d@maureen.teleport.com>
- References: <4d5s19$m7l@nosy.bart.nl> <4de9g4$sc6@hades.rz.uni-sb.de> <4dh3tt$5lu@neptune.cs.trinity.edu>
- NNTP-Posting-Host: julie.teleport.com
- X-Newsreader: TIN [version 1.2 PL2]
-
- Megaman (trauschu@cs.trinity.edu) wrote:
- : B
- : > int get_nr_hds(void)
- : > {
- : > int res = 0;
-
- : > printf("Hello User! Please open your computer and check the\n");
- : > printf("number of HDs you have installed. Type that number: ");
- : > fscanf(stdin, "%d", &res);
- : > return res;
- : > }
-
- : I must say this was the most entertaining message I have read here in a while.
- : All kidding aside, I have tried a few procedures for detecting the number
- : of drives, but is there any one way that is best (aside from the above) :-)
-
- : Thomas
-
- : --
- : -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- : "Hakuna Matata" - it means no worries. - "C'est la vie"
-
- : Computer Science Major
- : 3D Graphics Interests
- : -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-
- All kidding aside, why not check the multi-plexer. Ask it to return the
- number of CD-ROM drives installed. If it returns more than zero then it
- should tell you what the name of the first drive is. For example, if I
- had 2 hard-drives and at least one CD drive it would tell you, the first
- CD is E:... this would mean that the last writeable drive would be E - 1
- or D:... you think?
-
- Or... use a DOS function to return the number of bytes available... if it
- is -1 there was a problem reading the drive, either CD or non-existing.
-
- --
- Real Life: Craig R. Lovegren
- CyberLife: craigl@teleport.com
- IRC Life: Son-Of-Yo
-